/*
	object with standard interface to set control values in case some controls (buttons, etc), take different values

*/


ToggleValueSetter{

	var ctrl;

	*new{|ctrlArg|
		^super.new.init(ctrlArg);
	}
	
	init{|ctrlArg|
		ctrl = ctrlArg;
	}
	
	setValue{|val|
		var buttonStateNumber = 0;
		if(val == true){
			buttonStateNumber = 1	
		};
		"buttonStateNumber".post;
		buttonStateNumber.postln;
		{ ctrl.value_(buttonStateNumber)  }.defer;		
	}

}